package com.ruoyi.ysg.controller;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.ysg.service.IYsgCommonService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;

@RestController
@RequestMapping("/ysg/common")
public class YsgCommonController extends BaseController{
    @Resource
    IYsgCommonService commonService;
    @GetMapping("/getClassOptions")
    public AjaxResult getClassOptions(String keyWord) {
        return success(commonService.getClassOptions(keyWord));
    }

    @GetMapping("/getTeacherOptions")
    public AjaxResult getTeacherOptions(String keyWord) {
        return success(commonService.getTeacherOptions(keyWord));
    }

    @GetMapping("/getCourseOptions")
    public AjaxResult getCourseOptions(String classId) {
        return success(commonService.getCourseOptions(classId));
    }
}
